/*******************************************************************************
 * Copyright (c) 2008, 2025 Lablicate GmbH.
 *
 * This program and the accompanying materials are made
 * available under the terms of the Eclipse Public License 2.0
 * which is available at https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 * 
 * Contributors:
 * Philip Wenig - initial API and implementation
 *******************************************************************************/
package org.eclipse.chemclipse.model.baseline;

import static org.junit.jupiter.api.Assertions.assertEquals;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

public class BaselineSegment_3_Test {

	private IBaselineSegment segment;
	private int startRetentionTime;
	private int stopRetentionTime;
	private float startBackgroundAbundance;
	private float stopBackgroundAbundance;

	@BeforeEach
	public void setUp() {

		startRetentionTime = 4500;
		stopRetentionTime = 10500;
		startBackgroundAbundance = 500.0f;
		stopBackgroundAbundance = 4000.0f;
		segment = new BaselineSegment(startRetentionTime, stopRetentionTime);
		segment.setStartBackgroundAbundance(startBackgroundAbundance);
		segment.setStopBackgroundAbundance(stopBackgroundAbundance);
	}

	@Test
	public void testGetStartRetentionTime_1() {

		assertEquals(startRetentionTime, segment.getStartRetentionTime());
		segment.setStartRetentionTime(stopRetentionTime);
		assertEquals(stopRetentionTime, segment.getStartRetentionTime());
	}

	@Test
	public void testGetStopRetentionTime_1() {

		assertEquals(stopRetentionTime, segment.getStopRetentionTime());
		segment.setStopRetentionTime(startRetentionTime);
		assertEquals(startRetentionTime, segment.getStopRetentionTime());
	}

	@Test
	public void testGetStartBackgroundAbundance_1() {

		assertEquals(startBackgroundAbundance, segment.getStartBackgroundAbundance(), 0);
	}

	@Test
	public void testGetStopBackgroundAbundance_1() {

		assertEquals(stopBackgroundAbundance, segment.getStopBackgroundAbundance(), 0);
	}
}
